package utils;

import bean.RpcGetBlock;

/**
 * @author:zhengyilong
 * @email:1797344574@qq.com
 * @phone:13479394730
 * @desc:该类用于将getblock命令获取到的result具体输出
 * @DateTime:2021/12/15 15:49
 **/
public class PrintGetBlock {
    public static void printGetBlock(RpcGetBlock rpcGetBlock){
        System.out.println("hash："+rpcGetBlock.getResult().get(0).getHash());
        System.out.println("confirmations："+rpcGetBlock.getResult().get(0).getConfirmations());
        System.out.println("strippedsize："+rpcGetBlock.getResult().get(0).getStrippedsize());
        System.out.println("size："+rpcGetBlock.getResult().get(0).getSize());
        System.out.println("weight："+rpcGetBlock.getResult().get(0).getWeight());
        System.out.println("height："+rpcGetBlock.getResult().get(0).getHeight());
        System.out.println("version："+rpcGetBlock.getResult().get(0).getVersion());
        System.out.println("versionHex："+rpcGetBlock.getResult().get(0).getVersionhex());
        System.out.println("merkleroot："+rpcGetBlock.getResult().get(0).getMerkleroot());
        System.out.println("tx："+rpcGetBlock.getResult().get(0).getTx()[0]);
        System.out.println("time："+rpcGetBlock.getResult().get(0).getTime());
        System.out.println("mediantime："+rpcGetBlock.getResult().get(0).getMediantime());
        System.out.println("nonce："+rpcGetBlock.getResult().get(0).getNonce());
        System.out.println("bits："+rpcGetBlock.getResult().get(0).getBits());
        System.out.println("difficulty："+rpcGetBlock.getResult().get(0).getDifficulty());
        System.out.println("chainwork："+rpcGetBlock.getResult().get(0).getChainwork());
        System.out.println("nTx："+rpcGetBlock.getResult().get(0).getNtx());
        System.out.println("previousblockhash："+rpcGetBlock.getResult().get(0).getPreviousblockhash());
        System.out.println("nextblockhash："+rpcGetBlock.getResult().get(0).getNextblockhash());
    }
}

